package demo1221.homework;

import java.util.Objects;

public class S implements Comparable<S>{
    private int Stuid;
    private String name;
    private int  age;
    private String biyeyuanxiao;

    public S() {
    }

    public S(int stuid, String name, int age, String biyeyuanxiao) {
        Stuid = stuid;
        this.name = name;
        this.age = age;
        this.biyeyuanxiao = biyeyuanxiao;
    }

    public int getStuid() {
        return Stuid;
    }

    public void setStuid(int stuid) {
        Stuid = stuid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getBiyeyuanxiao() {
        return biyeyuanxiao;
    }

    public void setBiyeyuanxiao(String biyeyuanxiao) {
        this.biyeyuanxiao = biyeyuanxiao;
    }

    @Override
    public String toString() {
        return "S{" +
                "Stuid=" + Stuid +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", biyeyuanxiao='" + biyeyuanxiao + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        S s = (S) o;
        return Stuid == s.Stuid &&
                age == s.age &&
                Objects.equals(name, s.name) &&
                Objects.equals(biyeyuanxiao, s.biyeyuanxiao);
    }

    @Override
    public int hashCode() {
        return Objects.hash(Stuid, name, age, biyeyuanxiao);
    }

    @Override
    public int compareTo(S o) {
        return 0;
    }
}
